home *** CD-ROM | disk | FTP | other *** search
- /*
- Library for ftpd clients.(libftp)
- Copyright by Oleg Orel
- All rights reserved.
-
- This library is desined for free, non-commercial software creation.
- It is changeable and can be improved. The author would greatly appreciate
- any advises, new components and patches of the existing programs.
- Commercial usage is also possible with participation of it's author.
-
-
-
- */
-
- #include "FtpLibrary.h"
-
- int ftplib_debug=FTP_nodebug;
-
- #define __EXIT if (ftplib_debug!=FTP_noexit) exit(-1)
-
- void FtpDebug(FTP *ftp)
- {
- STATUS FtpDebugDebug(),
- FtpDebugError(),
- FtpDebugIO();
-
- FtpSetDebugHandler(ftp,FtpDebugDebug);
- FtpSetErrorHandler(ftp,FtpDebugError);
- FtpSetIOHandler(ftp,FtpDebugIO);
- }
-
- STATUS FtpDebugDebug(FTP *ftp,int n, char * Message)
- {
- fprintf(stderr,"DEBUG:: %s\n",Message);
- return 1;
- }
-
- STATUS FtpDebugError(FTP *ftp,int n, char * Message)
- {
- fprintf(stderr,"Abort:: %s\n",Message);
- __EXIT;
- }
-
- STATUS FtpDebugIO(FTP *ftp,int n, char * Message)
- {
- fprintf(stderr,"IO");
- perror("");
- __EXIT;
- }
-
-
-
-